<template>
  <div class="research1">
      <h1 class="title">
          <span>本周最热咨询</span>
          <span></span>
      </h1>
      <div>
          <ul>
              <li class="newsdetail" v-for="(item,index) in newdata" :key="index">
                  <h1>
                       <nuxt-link :to="'/post/' + item.pid"><span class="dian"></span>{{item.name}}</nuxt-link>
                  </h1>
                  <h2>{{item.summary}}</h2>
                  <p>{{item.createtime.slice(0,11)}}</p>
              </li>
          </ul>
      </div>
  </div>
</template>

<script>
export default {
  props: {
    newdata:{
      type:Array,
      default:function(){
        return []
      }
    }
  }

};
</script>


<style scoped>
.research1{ 
    width: 100%;
    height: 1126px;
    margin-top: 10px;
    overflow: hidden;
    background: white;
    padding: 0 20px;
    box-sizing: border-box;
}
.title{
    padding: 20px 0 10px;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #ccc;
}
.title span:nth-child(1){
    color: #cd9c54;
    font-size: 20px;
}
.dian{
    display: inline-block;
    height: 6px;
    width: 6px;
    border-radius: 50%;
    background: black;
    vertical-align: middle;
    margin-right: 6px;
}
.newsdetail{
    height: 134px;
    border-bottom: 1px solid #ccc;
    box-sizing: border-box;
    overflow: hidden;
}
.newsdetail h1{
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 16px;
    color: #333;
    margin-top: 16px;
}
.newsdetail h2{
        height: 34px;
    margin-left: 16px;
    margin-top: 6px;
    font-size: 14px;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.3;
}
.newsdetail p{
    font-size: 14px;
    color: #666;
    text-align: right;
    margin-top: 16px;
}
</style>

